@echo off
title Running MSSQL2MySQL - Dev Mode
echo Starting the application...

REM Check if Python is installed
python --version >nul 2>&1
if %errorlevel% neq 0 (
    echo Error: Python is not installed or not in PATH
    echo Please install Python 3.7+ and try again
    pause
    exit /b 1
)

REM Check if dependencies are installed
echo Checking dependencies...
pip show Flask >nul 2>&1
if %errorlevel% neq 0 (
    echo Installing dependencies...
    pip install -r requirements.txt
    if %errorlevel% neq 0 (
        echo Error: Failed to install dependencies
        pause
        exit /b 1
    )
)

REM Start Flask application
echo.
echo ========================================
echo  MSSQL to MySQL Migration Tool
echo ========================================
echo  Main Page: http://localhost:7629
echo  Admin Panel: http://localhost:7629/admin
echo  Admin Login: admin / admin123
echo ========================================
echo.

python app.py

echo.
pause